<!DOCTYPE html>
<html>
<head>
	<title>表单提交</title>
	<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
</head>
<body>
	<form id="form">
		用户名：<input type="text" name="username" id="username"/><br/>
		邮箱地址：<input type="text" name="email" id="email"/><br/>
		url地址：<input type="text" name="url" id="url"/><br/>
		QQ：<input type="text" name="qq" id="qq"/><br/>
		sype：<input type="text" name="skype" id="skype"/><br/>
		<input type="button" value="提交">
	</form>
	<script>
		$('input[type = button]').click(function(){
			var data = $('#form').serialize();
			alert(data);
			
			$.ajax({
				url:"{:U('dem5')}",
				type:'post',
				data:data,
				success:function(data){
					
				}
			});
		});
	</script>
</body>
</html>